#!/usr/bin/python
# -*- coding: UTF-8 -*-
import time
import datetime

class  Dateutil:
    def get_week_of_month(self,year,month,day):
        end = datetime.datetime(year, month, day).strftime("%W")
        sss = int(datetime.datetime(year, month, 1).strftime("%w"))
        # 当某月第一日是周六或者周日时，3号计算该月第一周数
        if sss != 6 and sss != 0:
            beginday = 1
        else:
            beginday = 3
        begin = datetime.datetime(year, month, beginday).strftime("%W")
        return int(end) - int(begin) + 1

    #print get_week_of_month(2019,07,23);